home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / plugin / gamelib / ps.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-06  |  857 b   |  48 lines

  1. class particle_system : public bsp_object
  2. {
  3.     public:
  4.  
  5.         vector color_new,colorvar_new;
  6.         float bump_new,friction_new,radius_new,
  7.             mass_new,gravity_new,speed_new,
  8.             speed_var,ax,ay;
  9.         int col_flag_new,texture_new;
  10.         int emmtime,totpart,fadetime;
  11.         
  12.         int part0,part1;
  13.         color_particle *part;
  14.         
  15.     int step(int dt);
  16.  
  17.     void draw();
  18.  
  19.     int get_custom_param_desc(int i,param_desc *pd);
  20.  
  21.     inline bsp_object *clone() 
  22.     { 
  23.         particle_system *p=new particle_system;
  24.         *p=*this;
  25.         p->source=this;
  26.         return p; 
  27.     };
  28.  
  29.     particle_system()
  30.     {
  31.         type=TYPE_PARTICLE_SYSTEM;
  32.         part=0;
  33.     }
  34.     ~particle_system()
  35.     {
  36.         if (part)
  37.             delete part;
  38.     }
  39. };
  40.  
  41. class ps_desc : public class_desc
  42. {
  43. public:
  44.     void *create() { return new particle_system; };
  45.     char *get_name() { return "ps"; };
  46.     int get_type() { return TYPE_PARTICLE_SYSTEM; };
  47. };
  48.